package com.demo.event;

import cn.lingyangwl.framework.mq.base.enums.QosEnum;
import cn.lingyangwl.framework.mqtt.listener.IMqttListener;
import cn.lingyangwl.framework.mqtt.listener.MqttMessageListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author shenguangyang
 */
@Component
@MqttMessageListener(topic = "test1", qos = QosEnum.QoS1)
public class Demo1Listener implements IMqttListener {
    private static final Logger log = LoggerFactory.getLogger(Demo1Listener.class);
    @Override
    public void onMessage(String topic, String message) {
        log.info("topic: {}, message: {}", topic, message);
    }
}
